LAMMPS (4 May 2022)
  using 1 OpenMP thread(s) per MPI task
# sample LAMMPS input script for thermal conductivity of liquid LJ
# use fix ehex to add/subtract energy from 2 regions

# settings

variable        x equal 10
variable        y equal 10
variable        z equal 20

variable        rho equal 0.6
variable        t equal 1.35
variable        rc equal 2.5

#variable       rho equal 0.85
#variable        t equal 0.7
#variable       rc equal 3.0

# setup problem

units           lj
atom_style      atomic

lattice         fcc ${rho}
lattice         fcc 0.6
Lattice spacing in x,y,z = 1.8820721 1.8820721 1.8820721
region          box block 0 $x 0 $y 0 $z
region          box block 0 10 0 $y 0 $z
region          box block 0 10 0 10 0 $z
region          box block 0 10 0 10 0 20
create_box      1 box
Created orthogonal box = (0 0 0) to (18.820721 18.820721 37.641441)
  2 by 1 by 4 MPI processor grid
create_atoms    1 box
Created 8000 atoms
  using lattice units in orthogonal box = (0 0 0) to (18.820721 18.820721 37.641441)
  create_atoms CPU = 0.000 seconds
mass            1 1.0

velocity        all create $t 87287
velocity        all create 1.35 87287

pair_style      lj/cut ${rc}
pair_style      lj/cut 2.5
pair_coeff      1 1 1.0 1.0

neighbor        0.3 bin
neigh_modify    delay 0 every 1

# heat layers

region          hot block INF INF INF INF 0 1
region          cold block  INF INF INF INF 10 11
compute         Thot all temp/region hot
compute         Tcold all temp/region cold

# 1st equilibration run

fix             1 all nvt temp $t $t 0.5
fix             1 all nvt temp 1.35 $t 0.5
fix             1 all nvt temp 1.35 1.35 0.5
thermo          100
run             1000
Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
Neighbor list info ...
  update every 1 steps, delay 0 steps, check yes
  max neighbors/atom: 2000, page size: 100000
  master list distance cutoff = 2.8
  ghost atom cutoff = 2.8
  binsize = 1.4, bins = 14 14 27
  1 neighbor lists, perpetual/occasional/extra = 1 0 0
  (1) pair lj/cut, perpetual
      attributes: half, newton on
      pair build: half/bin/atomonly/newton
      stencil: half/bin/3d
      bin: standard
Per MPI rank memory allocation (min/avg/max) = 3.152 | 3.152 | 3.152 Mbytes
   Step          Temp          E_pair         E_mol          TotEng         Press     
         0   1.35          -4.1241917      0             -2.0994448     -3.1961612    
       100   1.1819832     -3.7640881      0             -1.991335       0.53985757   
       200   1.2578365     -3.7395333      0             -1.8530144      0.69591862   
       300   1.3282971     -3.7215427      0             -1.7293461      0.79036065   
       400   1.3714367     -3.7043826      0             -1.6474847      0.85873226   
       500   1.3590952     -3.6707735      0             -1.6323855      0.99602024   
       600   1.3575117     -3.7118244      0             -1.6758114      0.81454305   
       700   1.3284444     -3.7075488      0             -1.7151313      0.81136596   
       800   1.3419995     -3.7155648      0             -1.7028172      0.82925676   
       900   1.3562214     -3.6965609      0             -1.6624831      0.88908117   
      1000   1.3732017     -3.7100044      0             -1.6504594      0.83982701   
Loop time of 0.925673 on 8 procs for 1000 steps with 8000 atoms

Performance: 466687.339 tau/day, 1080.295 timesteps/s
98.5% CPU use with 8 MPI tasks x 1 OpenMP threads

MPI task timing breakdown:
Section |  min time  |  avg time  |  max time  |%varavg| %total
---------------------------------------------------------------
Pair    | 0.5071     | 0.52493    | 0.5485     |   1.7 | 56.71
Neigh   | 0.23405    | 0.23912    | 0.24396    |   0.7 | 25.83
Comm    | 0.084007   | 0.10338    | 0.12987    |   4.9 | 11.17
Output  | 0.00030358 | 0.00048259 | 0.0017229  |   0.0 |  0.05
Modify  | 0.035045   | 0.043306   | 0.051758   |   3.2 |  4.68
Other   |            | 0.01446    |            |       |  1.56

Nlocal:           1000 ave        1020 max         982 min
Histogram: 1 0 2 1 0 1 1 1 0 1
Nghost:         2299.5 ave        2331 max        2268 min
Histogram: 1 1 1 1 0 0 0 3 0 1
Neighs:          27122 ave       28382 max       26337 min
Histogram: 2 0 2 1 1 0 0 1 0 1

Total # of neighbors = 216976
Ave neighs/atom = 27.122
Neighbor list builds = 162
Dangerous builds = 0

velocity        all scale $t
velocity        all scale 1.35

unfix           1

# 2nd equilibration run

fix             1 all nve
fix             hot all ehex 1 100.0 region hot
fix             cold all ehex 1 -100.0 region cold

thermo_style    custom step temp c_Thot c_Tcold
thermo_modify   colname c_Thot Temp_hot colname c_Tcold Temp_cold
thermo          1000
run             10000
Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
Per MPI rank memory allocation (min/avg/max) = 3.406 | 3.406 | 3.406 Mbytes
   Step          Temp         Temp_hot      Temp_cold   
      1000   1.35           1.431295       1.2955644    
      2000   1.3537291      1.6418772      1.1875127    
      3000   1.3615152      1.6451299      1.1769094    
      4000   1.3612129      1.5281727      1.2022419    
      5000   1.3552182      1.6672955      1.2212864    
      6000   1.3643442      1.6072213      1.2390567    
      7000   1.3665773      1.6909819      1.1466611    
      8000   1.375741       1.6144274      1.1691231    
      9000   1.3701136      1.8238424      1.136342     
     10000   1.3563004      1.8059065      1.1547129    
     11000   1.3794051      1.692299       1.0515688    
Loop time of 10.4087 on 8 procs for 10000 steps with 8000 atoms

Performance: 415036.696 tau/day, 960.733 timesteps/s
98.8% CPU use with 8 MPI tasks x 1 OpenMP threads

MPI task timing breakdown:
Section |  min time  |  avg time  |  max time  |%varavg| %total
---------------------------------------------------------------
Pair    | 4.2937     | 5.0957     | 5.741      |  23.2 | 48.96
Neigh   | 2.1995     | 2.4735     | 2.7099     |  13.0 | 23.76
Comm    | 0.81056    | 1.5944     | 2.6024     |  51.8 | 15.32
Output  | 0.00049738 | 0.00074599 | 0.0021147  |   0.0 |  0.01
Modify  | 0.92166    | 1.0638     | 1.1348     |   7.9 | 10.22
Other   |            | 0.1804     |            |       |  1.73

Nlocal:           1000 ave        1105 max         883 min
Histogram: 1 1 2 0 0 0 0 0 2 2
Nghost:        2319.38 ave        2502 max        2114 min
Histogram: 1 3 0 0 0 0 0 0 0 4
Neighs:        27387.9 ave       32453 max       21803 min
Histogram: 2 2 0 0 0 0 0 0 0 4

Total # of neighbors = 219103
Ave neighs/atom = 27.387875
Neighbor list builds = 1696
Dangerous builds = 0

# thermal conductivity calculation

compute         ke all ke/atom
variable        temp atom c_ke/1.5

compute         layers all chunk/atom bin/1d z lower 0.05 units reduced
fix             2 all ave/chunk 10 100 1000 layers v_temp file profile.ehex

variable        tdiff equal f_2[1][3]-f_2[11][3]
fix             ave all ave/time 1 1 1000 v_tdiff ave running start 13000

variable kappa equal (100/(lx*ly)/2.0)*(lz/2.0)/f_ave

thermo_style    custom step temp c_Thot c_Tcold v_tdiff f_ave
WARNING: New thermo_style command, previous thermo_modify settings will be lost (src/output.cpp:903)
thermo_modify   colname c_Thot Temp_hot colname c_Tcold Temp_cold                 colname v_tdiff dTemp_step colname f_ave dTemp

run             20000
Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
Per MPI rank memory allocation (min/avg/max) = 3.656 | 3.657 | 3.658 Mbytes
   Step          Temp         Temp_hot      Temp_cold      dTemp_step       dTemp     
     11000   1.3794051      1.6903393      1.0515688      0              0            
     12000   1.3799777      1.8004888      1.1032219      0.63860014     0            
     13000   1.3733605      1.7823094      1.0553582      0.65827891     0.65827891   
     14000   1.3749743      1.7852256      1.1674016      0.68463005     0.67145448   
     15000   1.3863795      1.8538127      1.0056247      0.73524813     0.69271903   
     16000   1.3731955      1.7518546      1.0741458      0.74810775     0.70656621   
     17000   1.3771856      1.9016869      1.0090502      0.73999567     0.7132521    
     18000   1.3766032      1.7616195      1.1142155      0.73769104     0.71732526   
     19000   1.3815934      1.7791247      1.1406987      0.73617832     0.72001855   
     20000   1.3725543      1.8637436      1.0799364      0.73435569     0.7218107    
     21000   1.3817369      1.8808771      1.0642524      0.76702329     0.72683432   
     22000   1.3968704      1.840287       1.072304       0.82496419     0.7366473    
     23000   1.3895558      1.9427293      1.0766665      0.75363908     0.73819201   
     24000   1.3900493      1.9883976      1.1081017      0.86394774     0.74867166   
     25000   1.3838912      1.8853041      1.0795751      0.83043902     0.75496145   
     26000   1.3912105      1.9330259      1.1070335      0.79880182     0.75809291   
     27000   1.3891151      1.8548451      1.0676153      0.81856523     0.7621244    
     28000   1.3942624      1.9796706      1.1251407      0.81762456     0.76559316   
     29000   1.3819302      1.8619138      1.0495292      0.78627491     0.76680973   
     30000   1.3968366      1.883107       1.1004588      0.83902548     0.77082172   
     31000   1.3822489      1.8220413      1.0322271      0.7550338      0.76999077   
Loop time of 23.253 on 8 procs for 20000 steps with 8000 atoms

Performance: 371564.581 tau/day, 860.103 timesteps/s
98.9% CPU use with 8 MPI tasks x 1 OpenMP threads

MPI task timing breakdown:
Section |  min time  |  avg time  |  max time  |%varavg| %total
---------------------------------------------------------------
Pair    | 8.0778     | 10.624     | 13.006     |  62.2 | 45.69
Neigh   | 4.358      | 5.32       | 6.1917     |  35.5 | 22.88
Comm    | 1.5574     | 4.6136     | 8.0947     | 127.6 | 19.84
Output  | 0.0025729  | 0.0027796  | 0.0041615  |   1.0 |  0.01
Modify  | 2.0737     | 2.2922     | 2.4432     |   9.2 |  9.86
Other   |            | 0.4005     |            |       |  1.72

Nlocal:           1000 ave        1121 max         857 min
Histogram: 2 0 1 1 0 0 0 0 1 3
Nghost:        2299.75 ave        2541 max        2067 min
Histogram: 3 1 0 0 0 0 0 0 2 2
Neighs:        27487.2 ave       33361 max       20651 min
Histogram: 2 1 1 0 0 0 0 0 0 4

Total # of neighbors = 219898
Ave neighs/atom = 27.48725
Neighbor list builds = 3474
Dangerous builds = 0
print           "Running average thermal conductivity: $(v_kappa:%.2f)"
Running average thermal conductivity: 3.45
Total wall time: 0:00:34
